/*
 * Copyright (c) 2009-2013 EvTech Project
 * All rights reserved.
 * 
 * This file is part of LModeller.
 *
 * LModeller is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or 
 * (at your option) any later version.
 *
 * LModeller is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with LModeller.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */
package fi.honkalampisaatio.lmodeller.ui;

import java.util.Hashtable;

import fi.honkalampisaatio.lwjgl.GLTexture;



public class GameTextures {
	
	public static GameTextures INSTANCE;
	protected Hashtable<String, GLTexture> textureHashtable;

	public static GameTextures getInstance() {
		if (INSTANCE == null) {
			INSTANCE = new GameTextures();
		}
		return INSTANCE;
	}	
	
	public GameTextures()
	{
		textureHashtable = new Hashtable<String, GLTexture>();
		add("BACK_BUTTON", "images/back.png");
		add("DOWN_BUTTON", "images/down.png");
		add("MEMORYGAME_BUTTON", "images/memorygame.png");
		add("MODELGAME_BUTTON", "images/modelgame.png");
		add("BUILDMENU_BUTTON", "images/buildmenu.png");
		add("NEXT_BUTTON", "images/next.png");
		add("PREVIOUS_BUTTON", "images/previous.png");
		add("RANDOM_STEP_GAME_BUTTON", "images/random_step_game.png");
		add("HOME_BUTTON", "images/home.png");
		add("SETUP_BUTTON", "images/setup.png");
		add("SOUND_BUTTON", "images/sound.png");
		add("UP_BUTTON", "images/up.png");
		add("VOICE_BUTTON", "images/speech.png");
		add("EXIT_BUTTON", "images/exit.png");
	}
	
	public void add(String key, String img)
	{
		textureHashtable.put(key, new GLTexture(img));
	}
	
	public GLTexture getTexture(String key)
	{
		return textureHashtable.get(key);
	}
}
